package com.ving.mybatisspring.bean;

import org.springframework.beans.factory.FactoryBean;

import java.sql.DriverManager;

/**
 * Created by liuweijie on 2019-11-25.
 */
public class VingFactoryBean implements FactoryBean {
    @Override
    public Object getObject() throws Exception {
        return DriverManager.getDriver("jdbc:mysql://localhost:3306");

    }

    @Override
    public Class<?> getObjectType() {
        return java.sql.Driver.class;
    }

    @Override
    public boolean isSingleton() {
        return true;
    }
}
